import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '',
    component: () => import('@/views/Home'),
    redirect: '/hello_world',
    children: [
      {
        path: '/hello_world',
        name: '开始',
        component: () => import('@/views/开始/HelloWorld')
      }, {
        path: '/test',
        name: '测试App',
        component: () => import('@/views/测试/Test')
      }, {
        path: '/model_tier',
        name: '获取模型层级',
        component: () => import('@/views/模型/GetModelTier')
      }, {
        path: '/parent_to_tree',
        name: '向树形数据每一级添加父级参数',
        component: () => import('@/views/模型/AddParentToTree')
      }, {
        path: '/obj_world_position',
        name: '获取模型世界坐标',
        component: () => import('@/views/模型/GetObjWorldPosition')
      }, {
        path: '/get_obj_distance',
        name: '获取模型间距离',
        component: () => import('@/views/模型/GetObjDistance')
      }, {
        path: '/animations',
        name: '模型动画',
        component: () => import('@/views/模型/Animations')
      }, {
        path: '/event_listener',
        name: '事件监听',
        component: () => import('@/views/事件/EventListener')
      }, {
        path: '/remove_event_listener',
        name: '移除事件监听',
        component: () => import('@/views/事件/RemoveEventListener')
      }, {
        path: '/sky',
        name: '天空',
        component: () => import('@/views/场景/Sky')
      }, {
        path: '/scene_background',
        name: '场景背景图',
        component: () => import('@/views/场景/SceneBackGround')
      }, {
        path: '/scene_background_cube',
        name: '场景天空盒',
        component: () => import('@/views/场景/SceneBackGroundCube')
      }, {
        path: '/roam',
        name: '漫游',
        component: () => import('@/views/相机/Roam')
      }, {
        path: '/gui',
        name: 'Gui',
        component: () => import('@/views/插件/Gui')
      }, {
        path: '/stats',
        name: 'Stats',
        component: () => import('@/views/插件/Stats')
      }, {
        path: '/flyto',
        name: '相机飞行',
        component: () => import('@/views/相机/FlyTo')
      }, {
        path: '/flyto_obj',
        name: '相机飞行到模型周围',
        component: () => import('@/views/相机/FlyToObj')
      }, {
        path: '/outline',
        name: '边缘轮廓发光',
        component: () => import('@/views/后期处理/OutlinePass')
      }, {
        path: '/unreal_bloom',
        name: '辉光',
        component: () => import('@/views/后期处理/UnrealBloomPass')
      }, {
        path: '/orbit_controls',
        name: '轨道控制器',
        component: () => import('@/views/控制器/OrbitControls')
      }, {
        path: '/first_person',
        name: '第一人称相机控制',
        component: () => import('@/views/控制器/FirstPersonCameraControl')
      }, {
        path: '/spriteText',
        name: '精灵文字',
        component: () => import('@/views/标签/SpriteText')
      }, {
        path: '/spriteLabel',
        name: '精灵标签',
        component: () => import('@/views/标签/SpriteLabel')
      }, {
        path: '/divSpriteLabel',
        name: 'div精灵标签',
        component: () => import('@/views/标签/DivSpriteLabel')
      }, {
        path: '/2DLabel',
        name: '2DCss标签',
        component: () => import('@/views/标签/Show2DLabel')
      }, {
        path: '/3DLabel',
        name: '3DCss标签',
        component: () => import('@/views/标签/Show3DLabel')
      }, {
        path: '/smart_lab',
        name: '智慧实验室',
        component: () => import('@/views/简单案例/智慧实验室')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
